import { Module } from '@nestjs/common';
import { MongooseModule } from '@nestjs/mongoose';
import { PostsModule } from './posts/posts.module';
import { MemosModule } from './memos/memos.module';

@Module({
  imports: [
    MongooseModule.forRoot('mongodb://localhost:27017/blog', {
      useCreateIndex: true,
      useFindAndModify: false,
      useNewUrlParser: true,
      useUnifiedTopology: true,
    }),
    PostsModule,
    MemosModule,
  ],
  controllers: [],
  providers: [],
})
export class AppModule {}
